package com.flick.common;


import lombok.Getter;
import lombok.NoArgsConstructor;
import lombok.Setter;

@Getter
@Setter
@NoArgsConstructor
public class Result<T> {

    //返回代码
    private String code;
    private String msg;
    //数据类型 1:单体对象;2:列表;3:分页对象
    private Integer dataType = 1;
    private T data;

    public Result(T data) {
        this.code = "200";
        this.msg = "success";
        this.data = data;
    }

    public Result(String code, String msg) {
        this.code = code;
        this.msg = msg;
    }
}
